package net.loststone.dao

import org.springframework.beans.factory.InitializingBean
import com.mongodb.Mongo
import com.mongodb.DBCollection
import com.mongodb.DBObject

class EconInfoService implements InitializingBean {

    private static final String NOM_DB = "patopay"
    private static final String NOM_COLLECIO = "econinfos"

    Mongo mongoDb;
    DBCollection econinfoCollection;

    static transactional = true

    // inicialitzacio
    void afterPropertiesSet() {
        mongoDb = new Mongo();
        def db = mongoDb.getDB(NOM_DB)
        econinfoCollection = db.getCollection(NOM_COLLECIO)
    }

}
